import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class WriterFile {
    public static void main(String[] args) throws IOException {
        FileWriter fw = null;
        try {
            File file = new File("IO/file/out.txt");
            fw = new FileWriter(file,true);
            fw.write("I have a dream!\n");
            fw.write("enen!");

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if(fw!=null)
                fw.close();
        }
    }
}

/*
FileWriter的append属性:
    true: 追加
    false:默认。覆盖
 */
